<?php
namespace app\index\controller;

class Index extends Base
{
    public function index()
    {
        //首页文章列表
        $article = db('article')->limit(10)->order('t desc')->select();
        //文章分类
        $category = db('category')->field('id,name')->select();
        //站长推荐
        $zztj = db('article')->limit(10)->order('n desc')->select();

        $this->assign('a_list',$article);
        $this->assign('category',$category);
        $this->assign('zztj',$zztj);
        return view();
    }
}
